package Code;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class QuestionNum_23_3_hxj {
    public static void main(String[] args) throws Exception{
        BufferedWriter bw = new BufferedWriter(new FileWriter("C:\\360Downloads\\1\\number.txt"));
        List<Integer> list = new ArrayList<>();
        List<Integer> removeList = new ArrayList<>();
        Scanner sc = new Scanner(System.in);
        for (int i=1;i<=10;i++){
            System.out.println("请输入第"+i+"个数:");
            list.add(sc.nextInt());
        }

        for (int i=0;i<list.size();i++){
            if (list.get(i) > 10){
                continue;
            }else{
                removeList.add(list.get(i));
            }

        }
        System.out.println(removeList);
        String s = removeList.toString();

        bw.write(s);
        bw.close();
    }
}
